﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
namespace DataAccess
{
    public class TruyXuatThacMac
    {
        ThacMacDTO _ThacMac = new ThacMacDTO();

        public ThacMacDTO ThacMac
        {
            get { return _ThacMac; }
            set { _ThacMac = value; }
        }
        public void ThemThacMac()
        {
            DataProvider dp = new DataProvider();
            dp.KetNoi();
            string sql= "insert into ThacMac(TieuDe,LoaiThacMac,NoiDung,EmailNguoiGui) values(N'"+ThacMac.TieuDe+"',N'"+ThacMac.LoaiThacMac+"',N'"+ThacMac.NoiDung+"','"+ThacMac.EmailNguoiGui+"')";
            dp.ExecuteNonQuery(sql);
            dp.NgatKetNoi();

        }
    }
}
